package com.wgts.wgts.netmodle;


import com.wgts.wgts.netmodle.req.ActivityListRequest;
import com.wgts.wgts.netmodle.req.AddPutForwardReq;
import com.wgts.wgts.netmodle.req.AddShopCarRequest;
import com.wgts.wgts.netmodle.req.AffirmOrderRequest;
import com.wgts.wgts.netmodle.req.AppModleRequest;
import com.wgts.wgts.netmodle.req.AwardListReq;
import com.wgts.wgts.netmodle.req.ChangeGoodsNumberRequest;
import com.wgts.wgts.netmodle.req.CollectionProductRequest;
import com.wgts.wgts.netmodle.req.DelPutForwardReq;
import com.wgts.wgts.netmodle.req.DeleteShopRequest;
import com.wgts.wgts.netmodle.req.EditAddressRequest;
import com.wgts.wgts.netmodle.req.EditMyCenterMessageRequest;
import com.wgts.wgts.netmodle.req.FansSumReq;
import com.wgts.wgts.netmodle.req.FireRequest;
import com.wgts.wgts.netmodle.req.IssueEvaluateRequest;
import com.wgts.wgts.netmodle.req.IssurAfterSaleRequest;
import com.wgts.wgts.netmodle.req.LoginRequest;
import com.wgts.wgts.netmodle.req.MoreMoreGoodsInfoReq;
import com.wgts.wgts.netmodle.req.NavbarsRequset;
import com.wgts.wgts.netmodle.req.OperatingDataReq;
import com.wgts.wgts.netmodle.req.PlaceOrderRequest;
import com.wgts.wgts.netmodle.req.ProductClassRequest;
import com.wgts.wgts.netmodle.req.ProductEvaluateRequest;
import com.wgts.wgts.netmodle.req.ProductInfoRequest;
import com.wgts.wgts.netmodle.req.RefreshTokenRequest;
import com.wgts.wgts.netmodle.req.SearchShopListRequest;
import com.wgts.wgts.netmodle.req.SearchStoreListRequset;
import com.wgts.wgts.netmodle.req.ShopKeepAssetReq;
import com.wgts.wgts.netmodle.req.ShopKeepFansOrderReq;
import com.wgts.wgts.netmodle.req.ShopKeepFansReq;
import com.wgts.wgts.netmodle.req.SmsCodeRequest;
import com.wgts.wgts.netmodle.req.SpecialProductReq;
import com.wgts.wgts.netmodle.req.ThridPlatFromRequest;
import com.wgts.wgts.netmodle.req.TimeProductReq;
import com.wgts.wgts.netmodle.req.UpDownProductRequest;
import com.wgts.wgts.netmodle.req.UserPutForwardReq;
import com.wgts.wgts.netmodle.req.WXLoginRequest;
import com.wgts.wgts.netmodle.req.WgtsProductListReq;
import com.wgts.wgts.netmodle.resp.ActivityListEntity;
import com.wgts.wgts.netmodle.resp.AdvertisingEntity;
import com.wgts.wgts.netmodle.resp.AffirmOrderEntity;
import com.wgts.wgts.netmodle.resp.AfterSaleEntity;
import com.wgts.wgts.netmodle.resp.AllClassTypeEntity;
import com.wgts.wgts.netmodle.resp.AppModleEntity;
import com.wgts.wgts.netmodle.resp.AppUpdateEntity;
import com.wgts.wgts.netmodle.resp.ArticleEntity;
import com.wgts.wgts.netmodle.resp.AwardMoreListEntity;
import com.wgts.wgts.netmodle.resp.AwardPrizeEntity;
import com.wgts.wgts.netmodle.resp.AwardWinner;
import com.wgts.wgts.netmodle.resp.AwardWinnerDetail;
import com.wgts.wgts.netmodle.resp.ChangeGoodsPlanEntity;
import com.wgts.wgts.netmodle.resp.ClassBannerEntity;
import com.wgts.wgts.netmodle.resp.CollectListEntity;
import com.wgts.wgts.netmodle.resp.ComponentIndextActivityEntity;
import com.wgts.wgts.netmodle.resp.CurrentEntity;
import com.wgts.wgts.netmodle.resp.EditMyCenterMessageEntity;
import com.wgts.wgts.netmodle.resp.EditStoreEntity;
import com.wgts.wgts.netmodle.resp.EvaluateEntity;
import com.wgts.wgts.netmodle.resp.FansSumEntity;
import com.wgts.wgts.netmodle.resp.FireEntity;
import com.wgts.wgts.netmodle.resp.GoodProductEntity;
import com.wgts.wgts.netmodle.resp.GuessingAndAwardOrderEntity;
import com.wgts.wgts.netmodle.resp.GuessingListEntity;
import com.wgts.wgts.netmodle.resp.IdeaBackEntity;
import com.wgts.wgts.netmodle.resp.LoginEntity;
import com.wgts.wgts.netmodle.resp.MessageListEntity;
import com.wgts.wgts.netmodle.resp.MoreMoreGoodsInfoEntity;
import com.wgts.wgts.netmodle.resp.MoreMoreOpenEntity;
import com.wgts.wgts.netmodle.resp.MyCenterMessageEntity;
import com.wgts.wgts.netmodle.resp.MyJoinTaskEntity;
import com.wgts.wgts.netmodle.resp.MyOrderDetailsEntity;
import com.wgts.wgts.netmodle.resp.MyOrderListEntity;
import com.wgts.wgts.netmodle.resp.NavbarEntity;
import com.wgts.wgts.netmodle.resp.OperatingDataEntity;
import com.wgts.wgts.netmodle.resp.OrderEntity;
import com.wgts.wgts.netmodle.resp.ProductClassEntity;
import com.wgts.wgts.netmodle.resp.ProductEvaluateEntity;
import com.wgts.wgts.netmodle.resp.ProductInfoEntity;
import com.wgts.wgts.netmodle.resp.PutForwardTypeEntity;
import com.wgts.wgts.netmodle.resp.RecordSpreadEntity;
import com.wgts.wgts.netmodle.resp.RecordSummaryEntity;
import com.wgts.wgts.netmodle.resp.RefreshTokenEntity;
import com.wgts.wgts.netmodle.resp.ScreenEntity;
import com.wgts.wgts.netmodle.resp.SearchShopResultEntity;
import com.wgts.wgts.netmodle.resp.SearchStoreResultEntity;
import com.wgts.wgts.netmodle.resp.ShippingAddressEntity;
import com.wgts.wgts.netmodle.resp.ShopCarListEntity;
import com.wgts.wgts.netmodle.resp.ShopKeepFansEntity;
import com.wgts.wgts.netmodle.resp.ShopKeepFansOrderSum;
import com.wgts.wgts.netmodle.resp.ShopKeepTaskEntity;
import com.wgts.wgts.netmodle.resp.ShopKeeperEntity;
import com.wgts.wgts.netmodle.resp.ShopKeeperListEntity;
import com.wgts.wgts.netmodle.resp.SpecialProductEntity;
import com.wgts.wgts.netmodle.resp.StoreMsgEntity;
import com.wgts.wgts.netmodle.resp.TaskDetailEntity;
import com.wgts.wgts.netmodle.resp.TaskListEntity;
import com.wgts.wgts.netmodle.resp.ThridPreBindEntity;
import com.wgts.wgts.netmodle.resp.TimeProductEntity;
import com.wgts.wgts.netmodle.resp.UnreadMessageEntity;
import com.wgts.wgts.netmodle.resp.UserInfoEntity;
import com.wgts.wgts.netmodle.resp.UserMoneyRecordEntity;
import com.wgts.wgts.netmodle.resp.VipMessageEntity;
import com.wgts.wgts.netmodle.resp.WgtsFansCountEntity;
import com.wgts.wgts.netmodle.resp.WgtsFansDetail;
import com.wgts.wgts.netmodle.resp.WgtsFansSummyEntity;

import com.wgts.wgts.netmodle.resp.WgtsKeepAssetEntity;
import com.wgts.wgts.netmodle.resp.WgtsProductListEntity;
import com.wgts.wgts.react.MD5Util;
import com.wgts.wgts.tools.AppInfor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 */

public class NetService {

    private NetWorkFactory netWorkFactory = null;

    private static final String contentType = "application/x-www-form-urlencoded";

    private AppInfor appInfor = null;


    private NetService(NetWorkFactory netWorkFactory, AppInfor appInfor){
        this.netWorkFactory = netWorkFactory;
        this.appInfor = appInfor;
    }

    public static NetService _instance = null;

    public static NetService getInstance(NetWorkFactory netWorkFactory, AppInfor appInfor){
        if(_instance == null){
            _instance = new NetService(netWorkFactory, appInfor);
        }
        return _instance;
    }


    public static Map<String, String> bodyMap(){
        Long time = System.currentTimeMillis();
        Map<String, String> map = new HashMap<>();
        map.put(NetWorkConstant.PUBLIC_APPID, EnvironmentalData.appId);
        map.put(NetWorkConstant.PUBLIC_APPVER, AppInfor.getInstance().getAppVersion());
        map.put(NetWorkConstant.PUBLIC_TS, String.valueOf(time));
        map.put(NetWorkConstant.PUBLIC_DEVICEID, AppInfor.getInstance().getIMEI());

        String key = MD5Util.encrypt(EnvironmentalData.appSecret + EnvironmentalData.salt
                + AppInfor.getInstance().getIMEI() + String.valueOf(time));

        map.put(NetWorkConstant.PUBLIC_KEY, key);
        return map;
    }




    public void login( HttpResultSubscriber<LoginEntity> subscriber, LoginRequest request){
        netWorkFactory.createService(NetAPI.class)
                .login(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, request.account, request.smsCode)
                .compose(TransformUtils.<HttpResult<LoginEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void sendSMS(HttpResultSubscriber<CurrentEntity> subscriber, SmsCodeRequest smsCodeRequest){
        netWorkFactory.createService(NetAPI.class)
                .sendSMS(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, smsCodeRequest.phone, smsCodeRequest.scene)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void refreshToken(HttpResultSubscriber<RefreshTokenEntity> subscriber, RefreshTokenRequest request){
        netWorkFactory.createService(NetAPI.class)
                .refreshToken(request.refreshToken, bodyMap(),appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .subscribe(subscriber);
    }

    public void productClass(ProductClassRequest request, HttpResultSubscriber<List<ProductClassEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .productClass(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, request.parentId, request.scene)
                .compose(TransformUtils.<HttpResult<List<ProductClassEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void navBar(NavbarsRequset requset, HttpResultSubscriber<List<NavbarEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .navbar(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, requset.scene)
                .compose(TransformUtils.<HttpResult<List<NavbarEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void appModle(AppModleRequest request, HttpResultSubscriber<List<AppModleEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .appModle(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, request.scene, request.parentTypeId)
                .compose(TransformUtils.<HttpResult<List<AppModleEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void fireUser(FireRequest request, HttpResultSubscriber<FireEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .fireUser(request.userYQCode, request.accessToken, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<FireEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void wxLogin(WXLoginRequest request, HttpResultSubscriber<LoginEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .wxLogin(request.avatar, request.nickName, request.thirdparty, request.uid, request.unionid, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<LoginEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void bindUser(ThridPlatFromRequest request, HttpResultSubscriber<LoginEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .bindUser(request.phone, request.smsCode, request.uid, request.userYQCode,
                        "WX", request.unionid, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<LoginEntity>>defaultSchedulers())
                .subscribe(subscriber);

    }

    public void userInfo(HttpResultSubscriber<UserInfoEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .userInfo(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<UserInfoEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void productInfo(ProductInfoRequest request, HttpResultSubscriber<ProductInfoEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .productInfo(request.productId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ProductInfoEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void productEvaluate(ProductEvaluateRequest request, HttpResultSubscriber<ProductEvaluateEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .productEvaluate(request.productId, request.pageIndex, request.pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ProductEvaluateEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void collectionProduct(CollectionProductRequest request, HttpResultSubscriber<Integer> subscriber){
        netWorkFactory.createService(NetAPI.class).collectionProduct(request.collected, request.productId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<Integer>>defaultSchedulers()).subscribe(subscriber);
    }

    public void updownProduct(UpDownProductRequest request, HttpResultSubscriber<Integer> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .updownProduct(request.productId, request.updown, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<Integer>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void vipMessage(HttpResultSubscriber<List<VipMessageEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .vipMessage(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<VipMessageEntity>>> defaultSchedulers())
                .subscribe(subscriber);
    }

    public void hotSearch(HttpResultSubscriber<List<String>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .hotSearrch(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<String>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopList(SearchShopListRequest request, HttpResultSubscriber<SearchShopResultEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .searchShopResult(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION,
                        request.pageIndex, request.pageSize, request.typeId, request.name, request.brandId,
                        request.minPrice, request.maxPrice, request.order, request.sort, request.recommend)
                .compose(TransformUtils.<HttpResult<SearchShopResultEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void storeList(SearchStoreListRequset requset, HttpResultSubscriber<SearchStoreResultEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .searchStoreResult(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION,
                        requset.name, requset.pageIndex, requset.pageSize)
                .compose(TransformUtils.<HttpResult<SearchStoreResultEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopCarList(HttpResultSubscriber<List<ShopCarListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopCarList(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ShopCarListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void addShopCar(AddShopCarRequest request, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .addShopCar(request.productId, request.amount, request.skuId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void vipGood( HttpResultSubscriber<SearchShopResultEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .vipGood(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<SearchShopResultEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void changeGoodsNumber(ChangeGoodsNumberRequest request, HttpResultSubscriber<Integer> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .changeGoodsNumber(request.id, request.amount, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<Integer>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void deleteGoods(DeleteShopRequest request, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .deleteGoods(request.ids, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void myCenterMessage(HttpResultSubscriber<MyCenterMessageEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .myCenterMessage(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<MyCenterMessageEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void editMyCenterMessage(EditMyCenterMessageRequest request, HttpResultSubscriber<EditMyCenterMessageEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .editMyCenterMessage(request.updateType, request.userNickname, request.userImage, request.openId,
                         request.unionId, request.originUserPhone, request.originUserPhoneCode, request.newUserPhone,
                         request.newUserPhoneCode, request.newPayPassword, request.newConfirmPassword,
                        request.newPayPasswordCode, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<EditMyCenterMessageEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepData(HttpResultSubscriber<ShopKeeperEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepDate(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ShopKeeperEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void activityList(ActivityListRequest request, HttpResultSubscriber<List<ActivityListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .activityList(request.activityType, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ActivityListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shippingAddress(HttpResultSubscriber<List<ShippingAddressEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shippingAddressList(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ShippingAddressEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void editAddress(EditAddressRequest request, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .editAddress(request.addressId, request.userName, request.userPhone, request.province,
                        request.city, request.area, request.details, request.addressState, bodyMap(),
                        appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void normalAddress(String addressId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .normalAddress(addressId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void deleteAddress(String addressId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .deleteAddress(addressId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepTask(HttpResultSubscriber<List<ShopKeepTaskEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepTask(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ShopKeepTaskEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepAsset(ShopKeepAssetReq req, HttpResultSubscriber<List<WgtsKeepAssetEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepAsset(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, req.flowType, req.pageIndex, req.pageSize)
                .compose(TransformUtils.<HttpResult<List<WgtsKeepAssetEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepFans(ShopKeepFansReq req, HttpResultSubscriber<ShopKeepFansEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).shopKeepFans(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION, req.level, req.pageIndex, req.pageSize, req.userId)
                .compose(TransformUtils.<HttpResult<ShopKeepFansEntity>>defaultSchedulers()).subscribe(subscriber);
    }

    public void recordSpread(String userRoel, HttpResultSubscriber<List<RecordSpreadEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class).recordSpread(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION, userRoel).compose(TransformUtils.<HttpResult<List<RecordSpreadEntity>>>defaultSchedulers()).subscribe(subscriber);
    }

    public void recodeSummary(String userRole, HttpResultSubscriber<RecordSummaryEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).recodeSummary(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION, userRole).compose(TransformUtils.<HttpResult<RecordSummaryEntity>>defaultSchedulers()).subscribe(subscriber);
    }

    public void putForwardList(HttpResultSubscriber<List<PutForwardTypeEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class).putForwardList(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION).compose(TransformUtils.<HttpResult<List<PutForwardTypeEntity>>>defaultSchedulers()).subscribe(subscriber);
    }

    public void delPutForWard(DelPutForwardReq req, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).delPutForWard(req.cardId, bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION).compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers()).subscribe(subscriber);
    }

    public void addForWard(AddPutForwardReq req, HttpResultSubscriber<PutForwardTypeEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .addForWard(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION, req.bankName, req.cardCode, req.verifyCode, req.withdrawType, req.userName, req.bankAccount)
                .compose(TransformUtils.<HttpResult<PutForwardTypeEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void userPutForward(UserPutForwardReq req, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).userPutForward(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION, req.cardId, req.money, req.payPassword)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void fansSum(FansSumReq req, HttpResultSubscriber<FansSumEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).fansSum(bodyMap(), appInfor.getAccessToken()
                , AppInfor.PLAT_VERSION, req.relationLevel)
                .compose(TransformUtils.<HttpResult<FansSumEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void affirmOrder(AffirmOrderRequest requests, HttpResultSubscriber<AffirmOrderEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).affirmOrder(requests, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<AffirmOrderEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void collectList(Integer pageIndex, Integer pageSize, HttpResultSubscriber<CollectListEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).collectList(pageIndex, pageSize, bodyMap(), appInfor.getAccessToken()
        , AppInfor.PLAT_VERSION).compose(TransformUtils.<HttpResult<CollectListEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void deleteCollect(String productIds, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .deleteCollect(productIds, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void placeOrder(PlaceOrderRequest request, HttpResultSubscriber<OrderEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .placeOrder(request, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<OrderEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void timeProduct(TimeProductReq req, HttpResultSubscriber<TimeProductEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .timeProduct(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, req.activityId, req.beginTime, req.endTime, req.pageIndex, req.pageSize)
                .compose(TransformUtils.<HttpResult<TimeProductEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void allClassType(HttpResultSubscriber<List<AllClassTypeEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .allClassType(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<AllClassTypeEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void screen(Integer typeId, HttpResultSubscriber<ScreenEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .screen(typeId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ScreenEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void myOrderList(String orderState, Integer pageIndex, Integer pageSize,
                            HttpResultSubscriber<List<MyOrderListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .myOrderList(orderState, pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(),
                        AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<MyOrderListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void cancelOrder(String orderId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .cancelOrder(orderId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void continuePay(String orderId, String payType, String payPassword, HttpResultSubscriber<OrderEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .continuePay(orderId, payType, payPassword, bodyMap(), appInfor.getAccessToken(),
                        AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<OrderEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void myOrderDetails(int orderId, HttpResultSubscriber<MyOrderDetailsEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .myOrderDetails(orderId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<MyOrderDetailsEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepManagementData(OperatingDataReq req, HttpResultSubscriber<OperatingDataEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepManagementData(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, req.orderTradeStatus, req.pageIndex, req.day)
                .compose(TransformUtils.<HttpResult<OperatingDataEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void takeGoods(String orderId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .takeGoods(orderId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void specialProduct(SpecialProductReq req, HttpResultSubscriber<SpecialProductEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .specialProduct(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, req.activityId, req.pageIndex, req.pageSize)
                .compose(TransformUtils.<HttpResult<SpecialProductEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepFansOrderList(ShopKeepFansOrderReq req, HttpResultSubscriber<OperatingDataEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepFansOrderList(req.fansUserId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, req.pageIndex)
                .compose(TransformUtils.<HttpResult<OperatingDataEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepFansOrderSum(String userId, HttpResultSubscriber<ShopKeepFansOrderSum> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepFansOrderSum(userId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ShopKeepFansOrderSum>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void changeGoodsPlan(Integer orderId, HttpResultSubscriber<List<ChangeGoodsPlanEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .changeGoodsPlan(orderId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ChangeGoodsPlanEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeeperList(Integer userId, Integer pageIndex, Integer pageSize,
                               HttpResultSubscriber<ShopKeeperListEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeeperList(userId, pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(),
                        AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ShopKeeperListEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void editStore(String shopName, String shopImage, String shopDesc, HttpResultSubscriber<EditStoreEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .editStore(shopName, shopImage, shopDesc, bodyMap(), appInfor.getAccessToken(),
                        AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<EditStoreEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void moreMoreAction(MoreMoreGoodsInfoReq req, HttpResultSubscriber<MoreMoreGoodsInfoEntity> subscriber){
        netWorkFactory
                .createService(NetAPI.class)
                .moreMoreAction(req.drawId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<MoreMoreGoodsInfoEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void awardMoreList(HttpResultSubscriber<List<AwardMoreListEntity>> subscriber){
        netWorkFactory
                .createService(NetAPI.class)
                .awardMoreList(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<AwardMoreListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void guessAndAwardList(Integer drawAllType, Integer pageIndex, Integer pageSize, HttpResultSubscriber<List<GuessingAndAwardOrderEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .guessAndAwardList(drawAllType, pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<GuessingAndAwardOrderEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void componentIndexActivity(Integer pId, HttpResultSubscriber<List<ComponentIndextActivityEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .componentIndexActivity(pId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ComponentIndextActivityEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void launchMoreMoreAction(int shareId, HttpResultSubscriber<MoreMoreGoodsInfoEntity> subscriber){
        netWorkFactory
                .createService(NetAPI.class)
                .launchMoreMoreAction(shareId,  bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<MoreMoreGoodsInfoEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void moreOrderToDetail(int shareId, HttpResultSubscriber<MoreMoreGoodsInfoEntity> subscriber){
        netWorkFactory
                .createService(NetAPI.class)
                .moreOrderToDetail(shareId,  bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<MoreMoreGoodsInfoEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void guessingList(HttpResultSubscriber<List<GuessingListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .guessingList(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<GuessingListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void evaluate(String orderId, HttpResultSubscriber<List<EvaluateEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .evaluate(orderId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<EvaluateEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void issueEvaluate(IssueEvaluateRequest request, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .issueEvaluate(request, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void storeMsg(Integer shopId, HttpResultSubscriber<StoreMsgEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .storeMsg(shopId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<StoreMsgEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void afterSale(HttpResultSubscriber<List<String>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .afterSale(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<String>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void issueAfterSale(IssurAfterSaleRequest request, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .issueAfterSale(request, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void awardWinner(Integer winId, HttpResultSubscriber<AwardWinner> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .awardWinner(winId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<AwardWinner>>defaultSchedulers())
                .subscribe(subscriber);

    }

    public void awardEnsure(Integer winId, String addressId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .awardEnsure(winId, addressId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void awardPrizeList(AwardListReq awardListReq, HttpResultSubscriber<List<AwardPrizeEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .awardPrize(awardListReq.drawAllType, awardListReq.pageIndex, awardListReq.pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<AwardPrizeEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void joinActivityList(Integer drawAllType, Integer pageIndex, Integer pageSize, HttpResultSubscriber<List<GuessingAndAwardOrderEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .joinActivityList(drawAllType, pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<GuessingAndAwardOrderEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void moreMoreOpen(Integer shareId, HttpResultSubscriber<MoreMoreOpenEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .moreMoreOpen(shareId , bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<MoreMoreOpenEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void putAwardOrder(Integer pageIndex, Integer pageSize, HttpResultSubscriber<List<UserMoneyRecordEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .putAwardOrder(pageIndex, pageSize,  bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<UserMoneyRecordEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void putAwardInfo(Integer winnId, HttpResultSubscriber<AwardWinnerDetail> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .putAwardInfo(winnId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<AwardWinnerDetail>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void ensureAwardOrder(Integer winnId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .ensureAwardOrder(winnId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void ideaBack(String adviceUserPhone, String adviceContent, String adviceImages, HttpResultSubscriber<IdeaBackEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .ideaBack(adviceUserPhone, adviceContent, adviceImages, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<IdeaBackEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void appUpdate(String channel, String version, HttpResultSubscriber<AppUpdateEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).appUpdate("ANDROID", channel, version
                , bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<AppUpdateEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void advertising(HttpResultSubscriber<AdvertisingEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .advertising(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<AdvertisingEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void classBanner(Integer typeId, HttpResultSubscriber<List<ClassBannerEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .classBanner(typeId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<ClassBannerEntity>>>defaultSchedulers()).subscribe(subscriber);
    }

    public void goodProduct(Integer typeId, Integer pageIndex, Integer pageSize, HttpResultSubscriber<GoodProductEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .goodProduct(typeId, pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<GoodProductEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void payResultList(SearchShopListRequest request, HttpResultSubscriber<SearchShopResultEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .searchShopResult(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION,
                        request.pageIndex, request.pageSize, request.typeId, request.name, request.brandId,
                        request.minPrice, request.maxPrice, request.order, request.sort, request.recommend)
                .compose(TransformUtils.<HttpResult<SearchShopResultEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void unreadMessage(String typeCodes, HttpResultSubscriber<List<UnreadMessageEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .unreadMessage(typeCodes, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<UnreadMessageEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void clearMessage(String typeCodes, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .clearMessage(typeCodes, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void messageList(Integer pageIndex, Integer pageSize, HttpResultSubscriber<List<MessageListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .messageList(pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<MessageListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }



    public void activityProductInfo(Integer productId, Integer activityId, String beginTime, String endTime , HttpResultSubscriber<ProductInfoEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .activityProductInfo(productId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, activityId, beginTime, endTime)
                .compose(TransformUtils.<HttpResult<ProductInfoEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void shopKeepPhone(HttpResultSubscriber<String> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .shopKeepPhone(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<String>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void thridPreBind(String thirdparty, String uid, String unionid, String phone, String smsCode, HttpResultSubscriber<ThridPreBindEntity> subscriber){
        netWorkFactory.createService(NetAPI.class).thridPreBind(thirdparty, uid, unionid, phone, smsCode
                , bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<ThridPreBindEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void wgtsLogin(String userName, String password, HttpResultSubscriber<LoginEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .WgtsLogin(userName, password,bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<LoginEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void register(String username, String password, String smsCode, String inviteCode,
                         HttpResultSubscriber<LoginEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .register(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, username
                , password, smsCode, inviteCode)
                .compose(TransformUtils.<HttpResult<LoginEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void phoneAffirm(String phone, String scene, String smsCode, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .phoneAffirm(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION,
                        phone, scene, smsCode)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void resetPassword(String password, String confirmPassword, String smsCode, String phone,
                              HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .resetPassword(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION,
                        password, confirmPassword, smsCode, phone)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void wgtsProductList(WgtsProductListReq req, HttpResultSubscriber<List<WgtsProductListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .wgtsProductList(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, req.productType, req.pageIndex, req.pageSize)
                .compose(TransformUtils.<HttpResult<List<WgtsProductListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void wgtsFansCount(HttpResultSubscriber<List<WgtsFansCountEntity>> subscriber){
        netWorkFactory
                .createService(NetAPI.class)
                .wgtsFansCount(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<WgtsFansCountEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void wgtsFansSum(String relationLevel, HttpResultSubscriber<List<WgtsFansSummyEntity>> subscriber){
        netWorkFactory
                .createService(NetAPI.class)
                .wgtsFansSum(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, relationLevel)
                .compose(TransformUtils.<HttpResult<List<WgtsFansSummyEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void wgtsFansDetail(String relationLevel, String userRole, String pageIndex, String pageSize, HttpResultSubscriber<List<WgtsFansDetail>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .wgtsFansDetail(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, relationLevel, userRole, pageIndex, pageSize)
                .compose(TransformUtils.<HttpResult<List<WgtsFansDetail>>>defaultSchedulers())
                .subscribe(subscriber);
    }


    public void wgtsArticle(String pageIndex, String pageSize, HttpResultSubscriber<List<ArticleEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .wgtsArticle(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION, pageIndex, pageSize)
                .compose(TransformUtils.<HttpResult<List<ArticleEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void taskList(HttpResultSubscriber<List<TaskListEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .taskList(bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<TaskListEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void taskDetails(Integer taskId, HttpResultSubscriber<TaskDetailEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .taskDetails(taskId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<TaskDetailEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void joinTaskDetails(Integer userTaskId, HttpResultSubscriber<TaskDetailEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .joinTaskDetails(userTaskId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<TaskDetailEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void issueTask(Integer taskId, String taskCode, String taskUrl, HttpResultSubscriber<Integer> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .issueTask(taskId, taskCode, taskUrl, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<Integer>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void submitTask(Integer taskId, Integer userTaskId, String completeUrl, HttpResultSubscriber<Integer> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .submitTask(taskId, userTaskId, completeUrl, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<Integer>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void myJoinTask(Integer pageIndex, Integer pageSize,HttpResultSubscriber<List<MyJoinTaskEntity>> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .myJoinTask(pageIndex, pageSize, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<List<MyJoinTaskEntity>>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void vertifyTask(Integer userTaskId, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .verifyTask(userTaskId, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }

    public void affirmAlipay(String orderCode, String payType, HttpResultSubscriber<CurrentEntity> subscriber){
        netWorkFactory.createService(NetAPI.class)
                .affirmAlipay(orderCode, payType, bodyMap(), appInfor.getAccessToken(), AppInfor.PLAT_VERSION)
                .compose(TransformUtils.<HttpResult<CurrentEntity>>defaultSchedulers())
                .subscribe(subscriber);
    }


}
